package com.zczy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 用户访问记录表
 * @TableName zczy_user_log
 */
@TableName(value ="zczy_user_log")
@Data
public class ZczyUserLog implements Serializable {
    /**
     * 
     */
    @TableId(value = "log_id", type = IdType.AUTO)
    private Integer log_id;

    /**
     * 会员id
     */
    @TableField(value = "user_id")
    private Integer user_id;

    /**
     * 访问内容
     */
    @TableField(value = "action")
    private String action;

    /**
     * 访问次数（暂时不用）
     */
    @TableField(value = "count")
    private Integer count;

    /**
     * 访问时间
     */
    @TableField(value = "last_time")
    private String last_time;

    /**
     * 访问者ip
     */
    @TableField(value = "ip")
    private String ip;

    /**
     * 项目/资讯(1.项目，2.资讯，0，其他,3.历史项目)
     */
    @TableField(value = "content_class")
    private String content_class;

    /**
     * 项目分类/资讯分类
     */
    @TableField(value = "content_type")
    private String content_type;

    /**
     * 项目分类id/资讯分类id
     */
    @TableField(value = "type_id")
    private String type_id;

    /**
     * 项目id/资讯id
     */
    @TableField(value = "content_id")
    private String content_id;

    /**
     * 项目/资讯名称
     */
    @TableField(value = "content")
    private String content;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ZczyUserLog other = (ZczyUserLog) that;
        return (this.getLog_id() == null ? other.getLog_id() == null : this.getLog_id().equals(other.getLog_id()))
            && (this.getUser_id() == null ? other.getUser_id() == null : this.getUser_id().equals(other.getUser_id()))
            && (this.getAction() == null ? other.getAction() == null : this.getAction().equals(other.getAction()))
            && (this.getCount() == null ? other.getCount() == null : this.getCount().equals(other.getCount()))
            && (this.getLast_time() == null ? other.getLast_time() == null : this.getLast_time().equals(other.getLast_time()))
            && (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
            && (this.getContent_class() == null ? other.getContent_class() == null : this.getContent_class().equals(other.getContent_class()))
            && (this.getContent_type() == null ? other.getContent_type() == null : this.getContent_type().equals(other.getContent_type()))
            && (this.getType_id() == null ? other.getType_id() == null : this.getType_id().equals(other.getType_id()))
            && (this.getContent_id() == null ? other.getContent_id() == null : this.getContent_id().equals(other.getContent_id()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getLog_id() == null) ? 0 : getLog_id().hashCode());
        result = prime * result + ((getUser_id() == null) ? 0 : getUser_id().hashCode());
        result = prime * result + ((getAction() == null) ? 0 : getAction().hashCode());
        result = prime * result + ((getCount() == null) ? 0 : getCount().hashCode());
        result = prime * result + ((getLast_time() == null) ? 0 : getLast_time().hashCode());
        result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
        result = prime * result + ((getContent_class() == null) ? 0 : getContent_class().hashCode());
        result = prime * result + ((getContent_type() == null) ? 0 : getContent_type().hashCode());
        result = prime * result + ((getType_id() == null) ? 0 : getType_id().hashCode());
        result = prime * result + ((getContent_id() == null) ? 0 : getContent_id().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", log_id=").append(log_id);
        sb.append(", user_id=").append(user_id);
        sb.append(", action=").append(action);
        sb.append(", count=").append(count);
        sb.append(", last_time=").append(last_time);
        sb.append(", ip=").append(ip);
        sb.append(", content_class=").append(content_class);
        sb.append(", content_type=").append(content_type);
        sb.append(", type_id=").append(type_id);
        sb.append(", content_id=").append(content_id);
        sb.append(", content=").append(content);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}